package assignment3;

public class CalArea {
	public double CalculateArea(Rectangle ob) {
		return ob.GetLength() * ob.GetWidth();
	}
	public double CalculateArea(Triangle ob) {
		double a = ob.GetA();
		double b = ob.GetB();
		double c = ob.GetC();
		double p = (a+b+c)/2;
		return Math.sqrt(p * ((p - a) + (p - b) + (p - c)));
	}
	public double CalculateArea(Cricle ob) {
		return ob.GetRadius() * ob.GetRadius() * 3.14;
	}
}